package com.tanhua.dubbo.server.controller;


import com.tanhua.common.utils.NoAuthorization;


import com.tanhua.dubbo.server.service.ManagerLogService;
import com.tanhua.dubbo.server.vo.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/manage")
public class ManagerLogController {

    @Autowired
    private ManagerLogService managerLogService;
    /*根据用户id查询所有日志列表*/
    @NoAuthorization
    @GetMapping("/logs")
    public ResponseEntity videos(@RequestParam(defaultValue = "1") Integer page,
                                 @RequestParam(defaultValue = "10") Integer pagesize,
                                 @RequestParam("uid")Long uid,
                                 @RequestParam("sortProp")String sortProp,
                                 String type,
                                 @RequestParam("sortOrder")String sortOrder) {

        PageResult result = managerLogService.findAllLogs(page, pagesize, uid, sortProp,sortOrder);
        return ResponseEntity.ok(result);
    }


}
